package com.shensiyuan.lesson3;

public class StringTest {
	public static void main(String[] args) {
		String str1 = new String("aa");
		String str2 = new String("aa");

		System.out.println(str1.equals(str2));
		
		String str3 = "aa";
		String str4 = "aa";
		System.out.println(str3.equals(str4));

		String str5 = new String("cc");
		String str6 = "cc";
		
		System.out.println(str5 == str6);
		
		String s = "hello";
		String s1 = "hel";
		String s2 = "lo";
		
		System.out.println(s == s1 + s2);
		System.out.println(s == "hel"+"lo");
	}
}
